package com.sq.partner.manager.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.NocarPlan;
import com.sq.partner.manager.util.Page;


public interface IGatewayNocarInsureService    extends BaseService<NocarPlan, String>  { 
	
	NocarPlan getMaxPlanCodeFromDB(String planFlag) throws SQLException;
	
	boolean addNocarPlan(NocarPlan nocarPlan) throws Exception;
	
	Page<NocarPlan> queryNocarPlanPage(Page<NocarPlan> page) throws SQLException;
	
	NocarPlan queryTradNocarPlanInfo(NocarPlan nocarPlan) throws SQLException;
	
	Map<String,Object> queryMapTradNocarPlanInfo(NocarPlan nocarPlan) throws SQLException;
	
	boolean updateTradNocarPlanInfo(NocarPlan nocarPlan) throws Exception;
	
	boolean delTradNocarPlan(String planCode,String partnerCode) throws Exception;

	
	/**
	 * 更新代理信息
	 * @param insuplan
	 * @param prod
	 * @param gatewayuser
	 * @param agentTypeList
	 * @return
	 * @throws Exception
	 */
	boolean updateProxyInfo(String planNo,GatewayUser gatewayuser,String agentTypeList) throws Exception;
	/**
	 * 复制添加 “投保方案”
	 * @param insuplan oldPlanNo ifCopy
	 * @return
	 * @throws Exception
	 */
	boolean copyAddTradNocarPlan(NocarPlan nocarPlan,String oldPlanNo, boolean isCopy) throws Exception;
	
	/**
	 * 根据方案号判断配置信息是否为空
	 * @param planNo
	 * @return
	 * @throws Exception
	 */
	boolean proxyInfoIsEmpty(String planNo) throws Exception;

	 List<Map<String, Object>> searchNoCarPlansByplanCode(Map<String, Object> maps) throws Exception;
	 public  List<Map<String, Object>> impNocarRela(Map<String, Object> map)
				throws Exception;

}
